package com.ruoyi.otc.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.otc.domain.Company;
import com.ruoyi.otc.mapper.CompanyMapper;
import com.ruoyi.otc.service.ICompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
@DataSource(DataSourceType.SLAVE)
public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> implements ICompanyService {
    @Autowired
    private CompanyMapper companyMapper;


    @Override
    public List<Company> selectListByinstitutionCode(String institutionCode) {
        return companyMapper.selectList(new QueryWrapper<Company>().eq("institution_code",institutionCode));
    }
}
